In number theory, a full reptend prime or long prime in base b is a prime number p such that the formula
(where p does not divide b) gives a cyclic number. Therefore the digital expansion of in base b repeats the digits of the corresponding cyclic number infinitely. Base 10 may be assumed if no base is specified.
The first few values of p for which this formula produces cyclic numbers in decimal are (sequence A001913 in OEIS)
For example, the case b = 10, p = 7 gives the cyclic number 142857, thus, 7 is a full reptend prime. Furthermore, 1 divided by 7 written out in base 10 is 0.142857142857142857142857...
Not all values of p will yield a cyclic number using this formula; for example p = 13 gives 076923076923. These failed cases will always contain a repetition of digits (possibly several).
The known pattern to this sequence comes from algebraic number theory, specifically, this sequence is the set of primes p such that 10 is a primitive root modulo p. Artin's conjecture on primitive roots is that this sequence contains 37.395..% of the primes.
The term "long prime" was used by John Conway and Richard Guy in their Book of Numbers. Confusingly, Sloane's OEIS refers to these primes as "cyclic numbers."
The corresponding cyclic number to prime p will possess p - 1 digits if and only if p is a full reptend prime.
Advanced modular arithmetic can show that any prime of the following forms:
can never be a full reptend prime in base-10. The first primes of these forms, with their periods, are:
40k+1 | 40k+3 | 40k+9 | 40k+13 | 40k+27 | 40k+31 | 40k+37 | 40k+39 |
---|---|---|---|---|---|---|---|
41 period 5 |
43 period 21 |
89 period 44 |
13 period 6 |
67 period 33 |
31 period 15 |
37 period 3 |
79 period 13 |
241 period 30 |
83 period 41 |
409 period 204 |
53 period 13 |
107 period 53 |
71 period 35 |
157 period 78 |
199 period 99 |
281 period 28 |
163 period 81 |
449 period 32 |
173 period 43 |
227 period 113 |
151 period 75 |
197 period 98 |
239 period 7 |
401 period 200 |
283 period 141 |
569 period 284 |
293 period 146 |
307 period 153 |
191 period 95 |
277 period 69 |
359 period 179 |
However, studies show that two-thirds of primes of the form 40k+n, where n ≠ {1,3,9,13,27,31,37,39} are full reptend primes. For some sequences, the preponderance of full reptend primes is much greater. For instance, 285 of the 295 primes of form 120k+23 below 100000 are full reptend primes, with 20903 being the first that is not full reptend.